package com.naizhuai.ui.entity.mainbusiness;

import com.google.gson.Gson;

import java.io.Serializable;
import java.util.List;

/**
 * 提交复盘信息的相关类
 * Created by code_han on 2018/4/12.
 */

public class ActionSubmitReviewBean implements Serializable {

    public static final String COMPANY_ID_KEY="companyId";
    public static final String ACHIEVEMENT_KEY="achievement";
    public static final String TASK_SCORE_KEY="taskScore";

    private KeyAndValue companyId;
    private KeyAndValue achievement;
    private KeyAndValue taskScore;
    private Gson son;

    public ActionSubmitReviewBean() {
        son = new Gson();
    }

    public KeyAndValue getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = new KeyAndValue(COMPANY_ID_KEY,companyId);
    }

    public KeyAndValue getAchievement() {
        return achievement;
    }

    public void setAchievement(String achievement) {
        this.achievement = new KeyAndValue(ACHIEVEMENT_KEY,achievement);
    }

    public KeyAndValue getTaskScore() {
        return taskScore;
    }

    public void setTaskScore(List<TaskScore> taskScores) {
        taskScore = new KeyAndValue(TASK_SCORE_KEY,son.toJson(taskScores));
    }

    public static class KeyAndValue implements Serializable {
        private String key;
        private String name;

        public KeyAndValue() {
        }

        public KeyAndValue(String key, String name) {
            this.key = key;
            this.name = name;
        }

        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    public static class TaskScore implements Serializable {
        private String taskId;
        private String score;

        public TaskScore() {
        }

        public String getTaskId() {
            return taskId;
        }

        public void setTaskId(String taskId) {
            this.taskId = taskId;
        }

        public String getScore() {
            return score;
        }

        public void setScore(String score) {
            this.score = score;
        }
    }

}
